home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lantools
/
lantech
/
tech.doc
Wrap
Text File
|
1990-10-12
|
56KB
|
1,545 lines
LANtastic (tm) Network Operating System
Technical Reference Manual (TECH.DOC)
Version 3.00
(c) COPYRIGHT 1989 by ARTISOFT, INC
INTRODUCTION
This manual is intended for programmers who wish to make use of the network
services of the LANtastic Network Operating System (LANOS). LANOS services
described in this manual are for version 3.xx. LANOS services fall into
two categories: Standard MS-DOS compatible network functions and Extended
network functions. Since LANOS runs on any NETBIOS compatible LAN, NETBIOS
functions are also available although they are intrinsic to the underlying
NETBIOS implementation.
This manual assumes that the reader is familiar with 8088/80x86 assembly
language and DOS system functions. Since the standard MS-DOS compatible
network functions are described in the DOS technical reference manual, we
will not go into great detail in this manual.
Throughout this manual references will be made to network paths. LANOS
network paths are fully compatibly with MS-DOS network paths. Network
paths are similar to file paths except that they reference files through
the network. The general syntax for network path is:
\\server\path
where
server is 1 to 15 character name of a network file server
path is a DOS path on the server
For example,
\\MAIN_SERVER\PROGS\DATA\SAMPLE.TXT
refers to a file located on server MAIN_SERVER. The path required to
access the file is PROGS\DATA\SAMPLE.TXT. The directory PROGS is a shared
network directory and may not actually exist on the server. It may in fact
be an entire disk.
MS-NET compatible networks (e.g. IBM-PC LAN) do not fully support full
paths for all systems calls (in particular Findfirst). LANOS, however,
supports full paths for all system calls that can take a path argument.
This means that many public domain directory utilities will operate with a
network path. Refer to the OTHER USEFUL SYSTEM CALLS section for an
example of using findfirst/next to get network data.
INDIRECT FILES
Version 3.xx of LANOS supports a new type of file for use on the network.
This file type, know as an indirect file, resides on a server and is
accessible to all users with the 'I' ACL privilege. An indirect file
contains server relative path information that is expanded in place of the
file's name when a path is parsed by the server. In other words, an
indirect file points to another file or directory. Whenever you refer to
the indirect file, it's name is replaced by the file or directory it
contains.
The following examples illustrate the operation of indirect files.
Given the following indirect files:
Indirect file Contents
------------------- ---------------------
\ROOT\A \ROOT\AUTOEXEC.BAT
\MISC\C \ROOT\CONFIG.SYS
\ROOT\SOURCES\WIN.H ..\INCLUDE\WINDOW.H
\ROOT\DOC \MISC\MANUALS\NEW\DOC
Some sample path expansions would be:
Path Expansion
-------------------- --------------------------------
\ROOT\A \ROOT\AUTOEXEC.BAT
\MISC\C \ROOT\CONFIG.SYS
\ROOT\SOURCES\WIN.H \ROOT\INCLUDE\WINDOW.H
\ROOT\DOC\INTRO \MISC\MANUALS\NEW\DOC\INTRO
\ROOT\DOC\CHAPTERS\1 \MISC\MANUALS\NEW\DOC\CHAPTERS\1
As you can see from the above examples, indirect files can be used to point
to other files or directories. The advantage of indirect files is that the
actual files or directories that they point to can reside on one area while
multiple indirect file can reference them with a variety of names while
residing in another directory.
Indirect files are not available directly from DOS. To use indirect files
you must reference them through the network.
System calls that are useful for the manipulation of indirect files are:
5FB3H Translate path
5FB4H Create indirect file
5FB5H Get indirect file contents
ERROR CODES
All MS-DOS compatible system calls and all LANOS specific system calls
return error codes. The error code number is always returned in AX. When
an error occurs the carry flag (CY) is set. LANOS provides a mechanism for
expanding the error code number into a text string. The following is a
list of error codes which may be returned by LANOS:
Error
Number Meaning
------ -------
01H Invalid function number
02H File not found
03H Path not found
04H File open limit has been exceeded or no handles left
05H Access denied
06H Invalid handle
07H Memory control blocks destroyed
08H The memory limit has been exceeded
09H Invalid memory block address
0AH Invalid environment
0BH Invalid format
0CH Invalid access code
0DH Invalid data
0EH RESERVED
0FH Invalid drive was specified
10H Attempt to remove current directory
11H Not same device
12H No more files
13H Attempt to write on write protected disk
14H Unknown unit
15H Drive not ready
16H Unknown command
17H Data CRC error
18H Bad request structure length
19H Seek error
1AH Unknown media
1BH Sector not found
1CH No paper
1DH Write fault
1EH Read fault
1FH General failure
20H Sharing violation
21H Lock violation
22H Invalid disk change
23H FCB unavailable
24H Sharing buffer overflow
25H RESERVED
26H Cannot complete file operation
27H-31H RESERVED
32H Network request not supported
33H Network node ??????????????? is not listening
34H The name already exists on the network
35H Cannot locate network name
36H The network is busy
37H Server connection to network node ??????????????? broken
38H The NETBIOS command limit has been exceeded
39H The network adapter has malfunctioned
3AH Incorrect response received from network node ???????????????
3BH Unexpected network error from network node ???????????????
3CH Incompatible network node ???????????????
3DH Print queue full on network node ???????????????
3EH No room for print file on network node ???????????????
3FH The print file has been deleted on network node ???????????????
40H The network name has been deleted
41H You have been denied access on network node ???????????????
42H Invalid network device
43H The network name was not found
44H The network name limit has been exceeded
45H The session limit has been exceeded
46H Network node ??????????????? has been temporarily paused
47H The network request to network node ??????????????? was denied
48H Print or disk redirection is paused on network node ???????????????
49H Invalid network version
4AH Account has expired
4BH Password has expired
4CH Login attempt invalid at this time
4DH Disk limit has been exceeded on network node ???????????????
4EH Not logged into network node ???????????????
4FH RESERVED
50H The file already exists
51H RESERVED
52H Cannot make directory entry
53H Failure on critical error
54H Too many redirections or logins to network node ???????????????
55H Duplicate redirection or login to network node ???????????????
56H Invalid username or password
57H Invalid parameter
58H Network data fault
59H Function not supported on network
5AH Required system component not installed
When you expand the error code into a text string the above question marks
are expanded to the name of the node you were referring to. To expand an
error code into a text string you will need to issue a multiplex interrupt
(2FH). The calling sequence is:
INPUT: AH 5
AL 0 for installation check
# for error code (in pre DOS 4.00)
1 or 2 for error code in DOS 4.00
BX Error code
OUTPUT: FLAGS NC if error code converted to text
CY if error code can't be converted
ES:DI Pointer to ASCIZ text buffer containing error text. This is
a read only text buffer and you must not alter the text in
this buffer.
If the error code is RESERVED it is expanded to "General failure". The
maximum width for the question mark fields is 15 characters. The error
text is automatically adjusted so that extra spaces are not in the text
buffer. For example the error text
Network node ??????????????? is not listening
would be
Network node HOST is not listening
for node HOST.
When coding for LANOS the following code sequence will work for MS-DOS
5.x, 4.x and 3.x:
mov ax, error_number ; Get error number
mov bx, ax ; Place in BX also
mov ah, 5
int 2fh
; ES:DI now points to error string.
NOTE: LANOS does not check AL when running under DOS 4.x or 5.x so the
values in AL are not important. The value in AL is important if you are
running on another network operating system such as IBM PC LAN.
TESTING FOR THE EXISTENCE OF THE NETBIOS
Before NETBIOS calls may be performed the NETBIOS must be installed. The
following code fragment illustrates how you should test for the existence
of the NETBIOS.
; An illegal NCB used to determine if the NETBIOS is present
illegal_NCB db 7fh ; Illegal command
db 63 dup (0) ; Rest of NCB is 0
;
; NETBIOS_PRESENT - Determine if we have a NETBIOS present
;
; IN: DS = Current Data segment
; ES = Current Data segment
;
; OUT: AX = Destroyed
; BX = Destroyed
; FLAGS = NO CARRY if present
; CARRY if not present
NETBIOS_present proc
push es
mov ax, 355ch ; Get 5C vector
int 21H
mov ax, es
pop es
cmp ax, 0F000h ; Pointing into BIOS?
je no_vector ; Yes - Then no real 5C
or ax, bx ; Test for 0
jnz have_vector ; Non-zero - Have 5C int
no_vector:
stc ; Show not present
ret
; We have a legal 5C vector. Now perform an illegal NCB
; request to make sure that it is a legal NETBIOS.
have_vector:
mov al, 0
mov bx, offset illegal_NCB
int 5cH
test al, al ; Will get changed on illegal command
jz no_vector
clc
ret
NETBIOS_present endp
TESTING FOR THE EXISTENCE OF THE REDIRECTOR, SERVER AND LANPUP
You can issue a multiplex interrupt (2FH) to determine if the redirector,
server or LANPUP software is installed.
INPUT: AX B800H
OUTPUT: AL 0 If neither redirector or server installed
NZ Redirector, server or LANPUP installed
BL Contains bits indicating which software is installed
10000000b Redirector has pop up receive message capability.
01000000b Server is installed
00001000b Redirector is installed
00000010b LANPUP is installed
DETERMINING NETWORK SOFTWARE VERSION
You can issue a multiplex interrupt to determine which version of the
network software is running.
INPUT: AX B809H
OUTPUT: AH Major version number
AL Minor version number
NOTE: The version numbers are returned as decimal numbers. For example,
version 3.00 would return:
AH 3
AL 0
THE ALTERNATE NETBIOS INTERFACE
The normal interface to the NETBIOS is via interrupt 5CH; the alternate
interrupt to the NETBIOS is via interrupt 2AH. The 2A interface is
provided by the LANtastic redirector. Some NETBIOS programs do not use the
standard 5C interface, but rather the alternate 2A interface.
The alternate interface (2A) was originally designed as a "higher" level
interface to network communications rather than the "low" level interface
(5C) provided by the NETBIOS. The 2A interface, however, does not support
any higher level functions than does the 5C interface and therefore has not
become a standard as has the 5C interface.
The REDIR intercepts 2A interrupts and reformats them to 5C interrupts. A
list of the 2A interface functions that are supported are described below.
2A interrupt functions are invoked by loading the AH or AX register with a
function code and then issuing a software interrupt 2A. For example,
mov ah, 0 ; Installation check
int 2AH ; Call alternate NETBIOS interface
FUNCTION: INSTALLATION CHECK
============================
DESCRIPTION: Checks if a 2A interface is installed.
INPUTS: AH 0
OUTPUTS: AH 0 if not installed
not 0 if installed
FUNCTION: EXECUTE NETBIOS WITH NO ERROR RETRY
=============================================
DESCRIPTION: Executes a NETBIOS command (similar to 5C interface). The
NETBIOS command may be optionally retried on certain error
conditions.
INPUTS: AX 01xxH or 0401H to execute NETBIOS with no error retry
0400H to execute NETBIOS with error retry
Error codes that are automatically retried are:
No sessions resources (09H)
No listen (12H)
Interface busy (21H)
ES:BX Pointer to NCB
OUTPUTS: AL NETBIOS error code
AH 0 if no error
1 if error
FUNCTION: GET RESOURCE INFORMATION
==================================
DESCRIPTION: Return NETBIOS resources which are available for use.
INPUTS: AH 5
OUTPUTS: BX Available names (16 - names in use)
CX Available NCBs (free NCBs)
DX Available sessions (max sessions - pending sessions)
CONTROLLING REDIRECTED PRINTER STREAMS
You can control how output is sent to redirected printers in three ways:
1. You can set a combine mode which does not separate multiple print jobs
when programs terminate or when the printer is opened or closed.
2. You can set a separate mode which separates print jobs when a program
terminates or when the printer is opened and closed.
3. You can flush redirected output, thereby forcing the printer to begin
printing.
The above three functions may be performed using the NET LPT COMBINE, NET
LPT SEPARATE and NET LPT FLUSH commands. Often these commands need to be
performed within programs. Two software interfaces are provided to allow
you to control these functions. These interfaces consist of 2AH interrupt
interface and a standard 21H system call interrupt interface.
NOTE: The DOS COMMAND.COM program always sets redirected printer separate
mode when it prompts for command input and therefore these interrupts are
ineffective across multiple program invocations performed through
COMMAND.COM. The only exception to this is inside batch files, since
COMMAND.COM does not prompt for command input.
2AH INTERRUPT INTERFACE
FUNCTION: SET SPOOLED OUTPUT TO COMBINE MODE
============================================
DESCRIPTION: All printer output is combined into 1 print job regardless of
the printer being opened or closed or programs terminating.
INPUTS: AX 0601H
OUTPUTS: none
FUNCTION: SET SPOOLED OUTPUT IN SEPARATE MODE
=============================================
DESCRIPTION: Printer output is not combined when multiple programs are run
or when the printer is opened or closed. This command
implicitly starts a new print job.
INPUTS: AX 0602H
OUTPUTS: none
FUNCTION: FLUSH PRINTER OUTPUT
==============================
DESCRIPTION: Printer output is flushed and a new print job is started. If
no output exists to be flush then this function has no effect.
INPUTS: AX 0603H
OUTPUTS: none
21H INTERRUPT INTERFACE
FUNCTION: RETURN REDIRECTED PRINTER MODE
========================================
DESCRIPTION: Returns the current printer mode.
INPUTS: AX 5D07H
OUTPUTS: DL 0 Redirected output is being combined
1 Redirected output is being separated
FUNCTION: SET REDIRECTED PRINTER MODE
=====================================
DESCRIPTION: Sets the current printer mode.
INPUTS: AX 5D08H
DL 0 Set redirected output to be combined
1 Set redirected output to be separated. This command
implicitly starts a new print job.
OUTPUTS: none
FUNCTION: FLUSH PRINTER OUTPUT
==============================
DESCRIPTION: Printer output is flushed and a new print job is started. If
no output exists to be flush then this function has no effect.
INPUTS: AX 5D09H
OUTPUTS: none
MS-DOS COMPATIBLE NETWORK FUNCTIONS
The MS-DOS network system call functions are supported with the exception
of GET and SET PRINTER SETUP STRING (5E02H and 5E03H). The printer setup
functions are not supported because the printer setup strings are defined
by the system administrator using the NET_MGR program. They are stored in
each printer's resource file (the @???????? files in LANTASTI.NET).
5E00H GET MACHINE NAME
===== ================
INPUT: AX 5E00H
DS:DX Pointer to 16 byte buffer where ASCIZ machine name is
returned
OUTPUT: FLAGS NC if no error
CY If error occurred
AX Error code if error
CL NETBIOS name number of machine name
CH 0 If machine name is not set
Not zero if machine name has been set
DS:DX ASCIZ machine name
GET MACHINE NAME returns the name your computer is known by on the network.
This name is specified when you run REDIR. You may use the name and
NETBIOS name number returned by this function to perform NETBIOS commands.
You must not use any other names added by LANOS.
5E02H SET PRINTER SETUP
===== =================
INPUT: AX 5E02H
BX Redirection list index
CX Setup string size
DS:SI Pointer to printer setup string
OUTPUT: FLAGS NC if no error
CY If error occurred
AX Error code if error
SET PRINTER SETUP sets a setup string to be sent to the network printer
whenever a file is queued to the printer.
NOTE: LANOS does not process this request since printer setup strings are
controlled by the system administer using the NET_MGR program. The system
call DOES NOT return an error.
5E03H GET PRINTER SETUP
===== =================
INPUT: AX 5E03H
BX Redirection entry index
ES:DI Pointer to area to contain setup string
OUTPUT: FLAGS NC if no error
CY If error occurred
AX Error code if error
CX Length of setup string
GET SETUP STRING will return the setup string set with 5E02H (Set Printer
Setup) above.
NOTE: LANOS does not process this request since printer setup strings are
controlled by the system administer using the NET_MGR program. The system
call DOES NOT return an error, however, and the length of the setup string
(CX) returned will be 0.
5F02H GET REDIRECTED DEVICE ENTRY
===== ===========================
INPUT: AX 5F02H
BX Redirection entry index (index 0 specifies the first entry)
DS:SI Pointer to 16-byte buffer for local device name
ES:DI Pointer to 128-byte buffer to receive the network path
referred to by the redirected device
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BL Type of device
03H Printer
04H Disk
BH Device status
Bit 0 0 If device is valid
1 If device is not valid
Bits 1-7 reserved
CX Value stored by 5F03H call (should be 0 for LANOS)
DX May be destroyed
BP May be destroyed
DS:SI ASCIZ device name
ES:DI ASCIZ network path
GET REDIRECTED DEVICE ENTRY returns information about a single redirected
device (see Redirect Device, 5F03H). This function may be used to build a
list of redirected devices.
5F03H REDIRECT DEVICE
===== ===============
INPUT: AX 5F03H
BL Type of device
03H Printer
04H Disk
CX Value to store with redirected device (Set this to 0 for
compatibility with LANOS)
DS:SI Pointer to ASCIZ local device name. For printer device
specify: PRN, LPT1, LPT2, LPT3, COM1 or COM2. For disk
device specify A:, B:, C:, etc.
ES:DI Pointer to network path for redirected device
OUTPUT: FLAGS NC if no error
CY If error occurred
AX Error code if error
REDIRECT DEVICE allows you to connect local devices to network paths. For
example you could connect your LPT1 device to a printer attached to another
node. References to LPT1 would then be routed to the network.
5F04H CANCEL DEVICE REDIRECTION
===== =========================
INPUT: AX 5F04H
DS:SI Pointer to ASCIZ device name
OUTPUT: FLAGS NC if no error
CY If error occurred
AX Error code if error
CANCEL DEVICE redirection allows you to remove a device redirection so that
the device is restored to its former state.
LANOS EXTENDED NETWORK FUNCTIONS
LANOS provides an extended set of network system calls which allow network
control which is not provided by the standard MS-DOS compatible network
requests.
NOTES ON FUNCTION LISTINGS
Several functions (5F83H, 5FA0H, 5FA4H, 5FA5H, 5FB0H, 5FB2H) are used to
obtain indexed data. By convention the call is made with the requested
index in BX (the index is always zero based unless otherwise noted). Upon
return from the call BX will contain the index of the NEXT login entry.
The current index will be BX-1.
If the index passed in BX refers to an invalid entry, the server or
redirector will index BX until they find a valid entry. They will then
return this entry AND BX incremented by one. Due to this, only the
immediately previous index can be assumed.
In several functions the notation <0> is used as in \\server<0>. This
refers to a binary zero NOT the characters <0>. The previous example is
equivalent to the data statement:
db "\\server",0
In each function listing the INPUT section refers to Calling Registers
while the OUTPUT section refers to Return Registers. Function descriptions
are only included if they aren't obvious by the name or by the descriptions
of input or output values.
EXTENDED FUNCTIONS
5F80H GET LOGIN ENTRY
===== ===============
INPUT: AX 5F80H
BX Login entry index (0 based)
ES:DI Pointer to 16-byte buffer to receive logged in server name
OUTPUT: FLAGS NC if no error
CY if error occurred (or no more entries are available)
AX Error code if error
BX Same value used to call function (you must increment BX
yourself to get next entry)
DL Adapter number used for log in
ES:DI Pointer to ASCIZ server name which does NOT include the
\\ prefix
5F81H LOGIN TO A SERVER
===== =================
INPUT: AX 5F81H
ES:DI Pointer to server, username and password in the form
\\server\username<0>password<0>
(If a NULL password is used, the form must be:
\\server\username<0><0><0>)
BL Adapter number to use for log in attempt
0ffh To try all valid adapters
0-5 To try adapter 0-5 explicitly
OUTPUT: FLAGS NC If no error
CY If error occurred
AX Error code if error
NOTE: Redir will capitalize the input string.
5F82H LOGOUT OF A SERVER
===== ==================
INPUT: AX 5F82H
ES:DI Pointer to server name to log out of in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
5F83H GET USERNAME ENTRY
===== ==================
INPUT: AX 5F83H
BX Username entry index (0 based)
ES:DI Pointer to 16-byte buffer to receive username used for this
log in
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next username entry index
DL Adapter number used for log in
ES:DI Pointer to ASCIZ username
5F84H GET INACTIVE SERVER ENTRY
===== =========================
INPUT: AX 5F84H
BX Non-logged in server index
ES:DI Pointer to 16-byte buffer to receive a server name that you
are NOT logged in to but which is available for logging in
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Same value used to call function (you must increment BX
yourself to get next entry)
DL Adapter number the inactive server is on (this number may
be used as input to the LOGIN TO SERVER (5F81H) function)
ES:DI Pointer to ASCIZ server name which does NOT include the \\
prefix
5F85H CHANGE PASSWORD
===== ===============
INPUT: AX 5F85H
ES:DI Pointer to \\server\old-password<0>new-password<0>
You must be logged into server
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
5F86H DISABLE ACCOUNT
===== ===============
INPUT: AX 5F86H
ES:DI Pointer to server and password in the form
\\server\password<0>. You must be logged into server
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
DISABLE ACCOUNT disables the current logged in account. It applies only
when concurrent login entries are set to 1 (by NET_MGR). The account must
then be reenabled by the system manager.
5F87H GET ACCOUNT
===== ===========
INPUT: AX 5F87H
DS:SI Pointer to 128-byte buffer to receive account information
ES:DI Pointer to server in the form \\server<0>
You must be logged into server
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Destroyed
GET ACCOUNT returns the information for the account used to log into this
server. The buffer format follows:
User account structure
user_account struc
UA_name db 16 dup (?) ; Zero padded username
UA_internal db 16 dup (0)
UA_description db 32 dup (?) ; Full user description
UA_privilege db ? ; Privilege bits (see bit mask
; definitions below)
UA_concurrent db ? ; Maximum concurrent log ins
UA_allowed_times db 42 dup (?) ; 1 bit for each half hour for 7 day
; week beginning on Sunday.
; 0 means allowed.
UA_internal2 dw ?
UA_last_login_time dw 2 dup (?) ; Last time logged in
UA_account_expiration dw 2 dup (?) ; Expiration date (MSDOS-format)
; Year, Month:Day
UA_password_expiration dw 2 dup (?) ; Expiration date (as above),
; 0 Means no expiration date
UA_password_extension db ? ; 1-31 Number of days to reextend
; password after change
; 0 No extension required
UA_undelete_char db ? ; First letter of UA_name when
; account is deleted (first
; character of UA_name is replaced
; with a zero.)
UA_future db 4 dup (?)
user_account ends
Privilege bits for UA_privilege:
UA_privilege_superACL equ 10000000b ; Bypass ACLs
UA_privilege_superqueue equ 01000000b ; Bypass queue protection
UA_privilege_peer equ 00100000b ; Treat as local process
UA_privilege_supermail equ 00010000b ; Bypass mail protection
UA_privilege_audit equ 00001000b ; The user can create audit entries
UA_privilege_system equ 00000100b ; The user has system manager
privileges
5F97H COPY FILE
===== =========
INPUT: AX 5F97H
CX:DX Amount to copy (set to FFFF:FFFF to copy entire file)
SI Source handle
DI Destination handle
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
AX:DX Amount copied
COPY FILE copies the source file (designated by the source handle) to the
destination file (designated by the destination handle). The copy is
performed by the server and requires no workstation resources.
5F98H SEND UNSOLICITED MESSAGE
===== ========================
INPUT: AX 5F98H
DS:SI Pointer to message buffer (buffer format is described
below)
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
NOTE: currently no errors are returned
Format of message buffer. The 16-byte name fields (MB_machine, MB_server
and MB_user) are null terminated and contain the first n characters to be
matched. For example AB<0> will match ABxxxxxx...
message_buffer struc
MB_reserved db ? ; Reserved field used by system call
MB_type db ? ; User defined message type (see bit mask
; definitions below)
MB_machine db 16 dup (?) ; Machine name destination
MB_server db 16 dup (?) ; User must be logged into this server
MB_user db 16 dup (?) ; User must be using this username
MB_originator db 16 dup (?) ; Originator's machine name. Filled in when
; message is received
MB_text db 80 dup (?) ; Message text
message_buffer ends
Message buffer type. The MBT_general type is used by NET and LANPUP to
send rude messages.
MBT_general equ 0 ; General message used by NET, LANPUP and others
MBT_warning equ 1 ; Server warning message
5F99H GET LAST RECEIVED UNSOLICITED MESSAGE
===== =====================================
INPUT: AX 5F99H
ES:DI Pointer to message buffer (see function 5F98H for buffer
format)
OUTPUT: FLAGS NC if no error
CY if error occurred (or if no message is pending)
AX Error code if error
5F9AH GET MESSAGE PROCESSING FLAG
===== ===========================
INPUT: AX 5F9AH
OUTPUT: DL Bits describing what processing should be done when an
unsolicited message is received
FLAGS NC if no error
CY if error occurred
AX Error code if error
Message processing bits
MPB_beep equ 00000001b ; Beep before message delivered
MPB_deliver equ 00000010b ; Deliver message to message service
MPB_auto_pop_up equ 00000100b ; Pop up messages automatically
5F9BH SET MESSAGE PROCESSING FLAG
===== ===========================
INPUT: AX 5F9BH
DL Bits describing what processing should be done when an
unsolicited message is received (see function 5F9AH for list
of bits)
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
5F9CH POP UP LAST RECEIVED MESSAGE
===== ============================
INPUT: AX 5F9CH
CX Amount of time, in ticks, to leave message on the screen
DH Line number of where message will be placed (topline is 0,
no validity checking done)
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
NOTE: The only error currently returned is 0BH (Invalid
format). This error is returned if the screen is not
currently in a text mode and the pop-up message can't be
displayed.
Pop up last received message displays the last received message on the
screen. The message is placed on the specified line for the specified
time. When the message is removed, the original screen contents are
restored. The message may be removed before the display time elapses by
pressing the Esc key.
5FA0H GET QUEUE ENTRY
===== ===============
INPUT: AX 5FA0H
BX Queue entry index (0 for first entry)
DS:SI Pointer to 162-byte buffer to receive queue entry
information
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next queue entry index
DS:SI Filled queue entry information buffer
Definition of a queue entry:
queue_entry struc
QE_status db ? ; Status of queue entry
QE_size dd ? ; Size of spooled file
QE_type db ? ; Type of queue entry
QE_output_control db ? ; Control of despooled file
QE_copies dw 1 ; Number of copies
QE_sequence dd ? ; Sequence number of queue entry
QE_spooled_file db 48 dup (?) ; Pathname of spooled file
QE_user db 16 dup (?) ; Username who spooled file
QE_machine db 16 dup (?) ; Machine name user was on
QE_date dw ? ; Date file spooled (MS-DOS format)
QE_time dw ? ; Time file spooled (MS-DOS format)
QE_destination db 17 dup (?) ; ASCIZ Device name or username destination
QE_comment db 48 dup (?) ; Comment field
queue_entry ends
Different queue entry statuses:
QE_status_free equ 0 ; The queue entry is empty
QE_status_update equ 1 ; The queue entry is being updated
QE_status_hold equ 2 ; The queue entry is held
QE_status_wait equ 3 ; The queue entry is waiting for despool
QE_status_active equ 4 ; The queue entry is being despooled
QE_status_cancel equ 5 ; The queue has been canceled
QE_status_file_error equ 6 ; The spooled file could not be accessed
QE_status_spool_error equ 7 ; The destination could not be accessed
QE_status_rush equ 8 ; Rush this job
Different types of queue entries:
QE_type_print equ 0 ; Spooled printer queue file
QE_type_message equ 1 ; Spooled message (mail)
QE_type_local_file equ 2 ; Spooled local file
QE_type_remote_file equ 3 ; Spooled remote file
QE_type_modem equ 4 ; Spooled to remote modem
QE_type_batch equ 5 ; Spooled batch processor file
Bit definitions for output control:
QE_OC_keep equ 01000000b ; Keep after despooling (don't delete)
; For mail - allow delete only by owner
QE_OC_voice equ 00100000b ; For mail - mail file contains voice data
5FA1H SET QUEUE ENTRY
===== ===============
INPUT: AX 5FA1H
BX Handle of opened queue entry
DS:SI Pointer to queue information buffer (see function 5FA0
for buffer format)
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
SET QUEUE ENTRY allows you to set certain fields in a queue entry. The
queue entry must be open and you must have a handle to it. The only fields
that are looked at and altered are:
QE_output_control
QE_copies
QE_destination (only for MAIL queue entries)
QE_comment
5FA2H CONTROL QUEUE
===== =============
INPUT: AX 5FA2H
BL Queue control command (commands are listed below)
ES:DI Pointer to server in the form \\server<0>.
For Cancel, Hold, Release and Rush commands:
CX:DX Sequence number to control
For Start, Halt, Halt_EOJ, Pause, Single and Restart commands:
DX Physical printer number
0, 1, 2 LPT1, LPT2, LPT3
3, 4 COM1, COM2
other All printers
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
Control queue allows you to manipulate print jobs and physical printer
despooling. You must have the proper privileges to do these commands.
Control queue commands. User must have the Q privilege to use commands
marked with a (*).
CQ_start equ 0 ;*Start despooling
CQ_halt equ 1 ;*Halt despooling
CQ_halt_EOJ equ 2 ;*Halt despooling at end of job
CQ_pause equ 3 ;*Pause the despooler at end of job
CQ_single equ 4 ;*Print single job
CQ_restart equ 5 ;*Restart the current print job
CQ_cancel equ 6 ; Cancel the currently printing job
CQ_hold equ 7 ; Hold the queue entry
CQ_release equ 8 ; Release a held queue entry
CQ_rush equ 9 ;*Make the queue entry a rushed job
5FA3H GET PRINTER STATUS
===== ==================
INPUT: AX 5FA3H
BX Physical printer number:
0, 1, 2 LPT1, LPT2, LPT3
3, 4 COM1, COM2
other All printers
DS:SI Pointer to 15-byte buffer to receive printer status
information
ES:DI Pointer to server in form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next physical printer number
DS:SI Filled printer status buffer
If the printer is actively printing then more detailed information is also
returned.
Definition of a printer status entry:
PS struc
PS_state db ? ; Printer state (defined below)
PS_index dw ? ; Queue index corresponding to print job being
; despooled. (-1 if not despooling: ignore rest
; of fields)
PS_CPS dw ? ; Actual characters per second being output
PS_output_chars dd ? ; Characters actually output so far
PS_read_chars dd ? ; Characters actually read from despooled file so
; far. May be used to compute percent completed.
PS_copies dw ? ; Copies remaining to print
PS ends
Definition of printer states:
printer_state record PS_state_pause:1, PS_state_value:7
PS_state_disabled equ 0 ; Printer is disabled
PS_state_single_job equ 1 ; Printer will stop at end of job
PS_state_multijob equ 2 ; Printer should print multiple jobs
5FA4H GET STREAM INFO
===== ===============
INPUT: AX 5FA4H
BX Stream index number (0 based)
DS:SI Pointer to 13-byte buffer to receive stream information
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next stream number
Each stream contains a logical printer resource template and a flag that
indicates if jobs printed for that logical printer resource should be
queued or not.
Definition of logical stream entry:
logical_stream struc
LS_queue db ? ; 0 Disabled, non-zero Enabled
LS_template db 12 dup (?) ; Template may contain ?'s (include "." as in
; @???????.???)
logical_stream ends
5FA5H SET STREAM INFO
===== ===============
INPUT: AX 5FA5H
BX Stream index number (0 based)
DS:SI Pointer to 13-byte buffer which contains stream information
(see function 5FA4H for buffer format)
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
5FA7H CREATE USER AUDIT ENTRY
===== =======================
INPUT: AX 5FA7H
DS:DX 8-byte (max) ASCIZ reason code
DS:SI 128-byte ASCIZ variable reason string
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
See the LANtastic NOS manual for a description of the reason codes and
reason strings.
5FB0H GET ACTIVE USER INFORMATION
===== ===========================
INPUT: AX 5FB0H
BX Login entry index of server (0 based)
DS:SI Pointer to 44-byte buffer to receive a server login entry
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next login entry index
DS:SI Filled buffer with login entry information (buffer format is
described below)
Definition of active user entry:
active_user_entry struc
AUE_VCID dw 0 ; Virtual circuit number
AUE_state db ? ; Login state (defined below)
AUE_command db ? ; Last command issued
AUE_IO db 5 dup (?) ; Number of I/O bytes (40 bit number)
AUE_requests db 3 dup (?) ; Number of server requests (24 bit number)
AUE_name db 16 dup (?) ; Name of logged in user
AUE_machine db 16 dup (?) ; Name of remote logged in machine
active_user_entry ends
Definition of the various login states and privileges:
AUE_state_starting equ 00000000b ; We are in the middle of a login
AUE_state_in equ 00000001b ; We are fully logged in
AUE_state_RPL equ 00000010b ; Remote program load login
AUE_privilege_superACL equ 10000000b ; Bypass ACLs
AUE_privilege_superqueue equ 01000000b ; Bypass queue protection
AUE_privilege_peer equ 00100000b ; Treat as local process
AUE_privilege_supermail equ 00010000b ; Bypass mail protection
AUE_privilege_audit equ 00001000b ; The user can create audit entries
AUE_privilege_system equ 00000100b ; The user has system manager
; privileges
Active user entry commands:
AUEC_login equ 0 ; Login into a server
AUEC_terminate equ 1 ; Process termination
AUEC_open equ 2 ; Open a file
AUEC_close equ 3 ; Close a file
AUEC_create equ 4 ; Create a file if it's there or not
AUEC_new equ 5 ; Create a new file that is not there
AUEC_unique equ 6 ; Create a unique file
AUEC_commit equ 7 ; Commit disk data to disk
AUEC_read equ 8 ; Read from file
AUEC_write equ 9 ; Write to file
AUEC_delete equ 10 ; Delete file
AUEC_set_attr equ 11 ; Set file attributes
AUEC_lock equ 12 ; Lock byte range
AUEC_unlock equ 13 ; Unlock byte range
AUEC_create_dir equ 14 ; Create a subdirectory
AUEC_delete_dir equ 15 ; Delete a subdirectory
AUEC_rename_file equ 16 ; Rename a file
AUEC_find_first equ 17 ; Find first matching file
AUEC_find_next equ 18 ; Find the next matching file
AUEC_disk_free equ 19 ; Get disk free space
AUEC_get_queue equ 20 ; Get a queue entry
AUEC_set_queue equ 21 ; Set a queue entry
AUEC_control_queue equ 22 ; Control the queue
AUEC_get_login equ 23 ; Return login information
AUEC_get_link equ 24 ; Return link description
AUEC_seek equ 25 ; Seek to a file position
AUEC_get_time equ 26 ; Get server's time
AUEC_audit equ 27 ; Create audit entry
AUEC_multi_open equ 28 ; Open file in a multitude of modes
AUEC_change_password equ 29 ; Change a password
AUEC_disable_account equ 30 ; Disable account from further log ins
AUEC_copy_file equ 31 ; Local server file copy
AUEC_get_username equ 32 ; Get a username from account file
AUEC_translate_path equ 33 ; Translate a server's logical path
AUEC_create_indirect equ 34 ; Make indirect file
AUEC_get_indirect equ 35 ; Get indirect file text
AUEC_printer_status equ 36 ; Printer status obtained
AUEC_get_stream equ 37 ; Get logical print stream information
AUEC_set_stream equ 38 ; Set logical print stream information
AUEC_get_account equ 39 ; Get an account record
5FB1H GET SHARED DIRECTORY INFORMATION
===== ================================
INPUT: AX 5FB1H
DS:SI Pointer to 64-byte buffer to receive shared resource
description
ES:DI Pointer to server and resource in the form
\\server\shared-resource<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
CX ACL privilege bits for requesting user
DS:SI ASCIZ description of shared resource
ACL bit definition:
ACL_read equ 1000000000000000b ; (R) Allow open for read and reading
ACL_write equ 0100000000000000b ; (W) Allow open for write and writing
ACL_create_file equ 0010000000000000b ; (C) Allow file creation
ACL_create_dir equ 0001000000000000b ; (M) Allow directory creation
ACL_lookup equ 0000100000000000b ; (L) Allow file/directory lookups
ACL_delete_file equ 0000010000000000b ; (D) Allow file deletion
ACL_delete_dir equ 0000001000000000b ; (K) Allow directory deletion
ACL_rename equ 0000000100000000b ; (N) Allow file renaming
ACL_execute equ 0000000010000000b ; (E) Allow program execution
ACL_physical equ 0000000001000000b ; (P) Allow physical access to device
ACL_attribute equ 0000000000100000b ; (A) Allow attribute changing
5FB2H GET USERNAME FROM ACCOUNT FILE
===== ==============================
INPUT: AX 5FB2H
BX Username entry index (0 for first entry)
DS:SI Pointer to 16-byte buffer to receive username
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
BX Next username entry index
DS:SI 16-Character username retrieved from server's account file
(NOT in ASCIZ form)
5FB3H TRANSLATE PATH
===== ==============
INPUT: AX 5FB3H
DS:SI Pointer to 128-byte buffer to receive translated path
ES:DI Pointer to full ASCIZ path (including server name)
(e.g. \\server\root\prog\file.ext<0>)
DX Type of translation to be performed. (The OR of the
following bits)
00000001b Expand bottom path as indirect file
00000010b Translate to actual path relative to server's
disk. (e.g C:\autoexec.bat)
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
DS:SI ASCIZ translated path
TRANSLATE PATH either translates an indirect file into the full network
path or it translates the given path into the path relative to the server.
This call can be used to determine how an indirect file is going to expand.
See Create Indirect File (5FB4H) for a description of indirect files.
For example, a server has a resource named programs which contains the
following path: d:\software\programs. If a user has redirected drive P: to
\\server\programs and the Translate Path call is made with DX set to
00000010b, the following would be returned: d:\software\programs.
5FB4H CREATE INDIRECT FILE
===== ====================
INPUT: AX 5FB4H
DS:SI Pointer to 128-byte ASCIZ server relative path which will be
the indirect file's contents
ES:DI Pointer to indirect file's full ASCIZ path
(e.g. "\\server\root\linkfile<0>")
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
CREATE INDIRECT FILE allows you to create an indirect file on a server.
Whenever the server references the indirect file, the contents of the
indirect file will be used instead of the indirect file's name. For
example, if the indirect file \\server\root\linkfile contained the path
\misc\text.dat, then whenever the file \\server\root\linkfile was
referenced, the path \misc\text.dat would be substituted.
5FB5H GET INDIRECT FILE CONTENTS
===== ==========================
INPUT: AX 5FB5H
DS:SI Pointer to 128-byte buffer to receive indirect file contents
ES:DI Pointer to full network path of indirect file
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
DS:SI ASCIZ contents of indirect file (a path)
Get indirect file contents will return the contents of an indirect file.
This call can be used to determine what the actual contents of an indirect
file are.
5FC0H GET SERVER'S TIME
===== =================
INPUT: AX 5FC0H
DS:SI Pointer to 8-byte buffer to receive time information
ES:DI Pointer to server in the form \\server<0>
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
DS:SI Filled buffer with time information
Definition of time buffer:
time_block struc
TB_year dw ? ; Year
TB_day db ? ; Day of month (1-31)
TB_month db ? ; Month (1-12)
TB_minutes db ? ; Minutes (0-59)
TB_hour db ? ; Hour (0-23)
TB_hundredths db ? ; Hundredths of seconds (0-99)
TB_seconds db ? ; Seconds (0-59)
time_block ends
5FD0H GET REDIRECTED LINEPRINTER TIMEOUT
===== ==================================
INPUT: AX 5FD0H
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
CX Redirected line printer timeout in ticks (18.2 ticks = 1
second)
A value of 0 means timeouts are disabled
5FD1H SET REDIRECTED LINEPRINTER TIMEOUTS
===== ===================================
INPUT: AX 5FD1H
CX Line printer timeout in ticks (18.2 ticks = 1 second)
A value of 0 disables timeouts
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
5FE0H GET DOS SERVICE VECTOR
===== ======================
INPUT: AX 5FE0H
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
ES:BX Pointer to current DOS service routine
5FE1H SET DOS SERVICE VECTOR
===== ======================
INPUT: AX 5FE1H
ES:BX New DOS service vector
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
The GET and SET DOS Service Vector calls allow you to take advantage of the
DOS busy checking that the redirector performs. Whenever DOS is safe to be
called the redirector calls the routine pointed to by the Set Vector call.
This routine could then use any DOS calls without worrying about whether
DOS was 'safe' to be called.
To chain into the DOS service vector you must obtain the old vector (5FE0)
and save it. When your service routine is called you will need to call the
old vector before beginning your processing.
5FE2H GET MESSAGE SERVICE VECTOR
===== ==========================
INPUT: AX 5FE2H
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
ES:BX Pointer to current message service routine
5FE3H SET MESSAGE SERVICE VECTOR
===== ==========================
INPUT: AX 5FE3H
ES:BX New message service vector location
OUTPUT: FLAGS NC if no error
CY if error occurred
AX Error code if error
These routines can be used to write a customized message receive/pop up
service. This service could expand or limit the pop up messages the
redirector shows now.
To chain into the message service vector you must obtain the old vector
(5FE2) and save it. When your service routine is called you will need to
call the old vector before beginning your processing.
(NOTE: when a service routine is called ES:BX will point to the currently
received message)
OTHER USEFUL SYSTEM CALLS
OBTAINING A LIST OF SHARED RESOURCES
The server's shared resources appear as directories or files in the
server's root directory (i.e. \\SERVER). To obtain a list of the server's
shared resources you can issue a find first system call (4EH) with a path
to the server's network control directory (e.g. \\server\*.*).
For example, to return all shared resources:
search_path db "\\server\*.*",0
. . .
mov ah, 4eh ; Find first system call
mov cx, 11h ; Include read-only & directory
mov dx, search_path
int 21h
. . .
mov ax, 5fb1h ; Do a Get Shared Directory Information system call
mov si, offset shared_information_buffer
mov di, offset <filename result from find first/next call>
int 21h
mov ah, 3fh ; Find next system call
int 21h
. . . ; \\server has a linkacl whose information can be
; obtained through the 5FB1H call. Just point
; es:di at \\server<0>.
To return just printer resources:
search_path db "\\server\@*.*",0
. . .
mov ah, 4eh ; Find first system call
mov cx, 01h ; Include read-only files
mov dx, offset search_path
int 21h
. . . ; Open found file and read in data. Note that @MAIL
; will be returned as a printer and should be
; masked off.
mov ah, 3fh ; Find next system call
int 21h
LIST OF MS-DOS COMPATIBLE NETWORK SYSTEM CALLS
5E00H Get Machine Name
5E02H Set Printer Setup
5E03H Get Printer Setup
5F02H Get Redirected Device Entry
5F03H Redirect Device
5F04H Cancel Device Redirection
LIST OF LANTASTIC NOS NETWORK SYSTEM CALLS
5F80H Get Login Entry
5F81H Login to a Server
5F82H Logout of a Server
5F83H Get Username Entry
5F84H Get Inactive Server Entry
5F85H Change Password
5F86H Disable Account
5F87H Get Account
5F97H Copy File
5F98H Send Unsolicited Message
5F99H Get Last Received Unsolicited Message
5F9AH Get Message Processing Flag
5F9BH Set Message Processing Flag
5F9CH Pop Up Last Received Message
5FA0H Get Queue Entry
5FA1H Set Queue Entry
5FA2H Control Queue
5FA3H Get Printer Status
5FA4H Get Stream Info
5FA5H Set Stream Info
5FA7H Create User Audit Entry
5FB0H Get Active User Information
5FB1H Get Shared Directory Information
5FB2H Get Username From Account File
5FB3H Translate Path
5FB4H Create Indirect File
5FB5H Get Indirect File Contents
5FC0H Get Server's Time
5FD0H Get Redirected Lineprinter Timeout
5FD1H Set Redirected Lineprinter Timeouts
5FE0H Get DOS Service Vector
5FE1H Set DOS Service Vector
5FE2H Get Message Service Vector
5FE3H Set Message Service Vector